package io.renren.common.utils.enums;

public enum payStatusEnums {

    succ_status("succ","交易成功"),
    failed_status("failed","failed"),
    error_status("error","error"),
    progress_status("progress","progress"),
    timeout_status("timeout","timeout"),
    cancel_status("cancel","cancel"),
    waitting_status("waitting","waitting"),
    unpay_status("unpay","交易未支付");


    private String type;

    private String value;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    payStatusEnums(String type, String value) {
        this.type = type;
        this.value = value;
    }

    public static String getValueByType(String type){
        payStatusEnums[] enums = values();
        for (payStatusEnums enum1 : enums){
            if (enum1.getType().equals(type)){
                return enum1.getValue();
            }
        }
        return null;
    }


}
